package org.dromara.business.domain.vo;

import org.dromara.business.domain.Video;
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.mybatis.core.vo.BaseVo;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;



/**
 * 视频基础信息视图对象 t_video
 *
 * @author Hao Tong Xue
 * @date 2025-04-21
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = Video.class)
public class VideoVo extends BaseVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 视频 ID
     */
    @ExcelProperty(value = "视频 ID")
    private Long id;

    /**
     * 视频标题
     */
    @ExcelProperty(value = "视频标题")
    private String title;

    /**
     * 视频简介
     */
    @ExcelProperty(value = "视频简介")
    private String description;

    /**
     * 视频文件 URL
     */
    @ExcelProperty(value = "视频文件id")
    private Long fileId;

    /**
     * 精灵图文件id
     */
    private Long spriteId;

    /**
     * 预览图配置json
     */
    private String thumbnailInfo;

    /**
     * 视频文件 URL
     */
    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "fileId")
    private String fileUrl;

    /**
     * 分辨率（如 1080p、720p）
     */
    @ExcelProperty(value = "分辨率", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "如=,1=080p、720p")
    private String resolution;

    /**
     * 视频格式（mp4, flv, avi 等）
     */
    @ExcelProperty(value = "视频格式", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "m=p4,,f=lv,,a=vi,等=")
    private String videoFormat;

    /**
     * 文件大小（字节）
     */
    @ExcelProperty(value = "文件大小", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "字=节")
    private Long size;

    /**
     * 封面图片 URL
     */
    @ExcelProperty(value = "封面图片id")
    private Long coverId;

    /**
     * 封面图片 URL
     */
    @Translation(type = TransConstant.OSS_ID_TO_URL, mapper = "coverId")
    private String coverUrl;

    /**
     * 所属合集id
     */
    @ExcelProperty(value = "所属合集id")
    private Long collectionId;

    /**
     * 所属合集名称
     */
    @ExcelProperty(value = "所属合集名称")
    private String collectionName;

    /**
     * 视频分区 ID
     */
    @ExcelProperty(value = "视频分区 ID")
    private Long categoryId;

    /**
     * 视频分区名称
     */
    @ExcelProperty(value = "视频分区名称")
    private String categoryName;

    /**
     * 视频时长（秒）
     */
    @ExcelProperty(value = "视频时长", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "秒=")
    private String duration;

    /**
     * 视频类型：0-自制，1-转载
     */
    @ExcelProperty(value = "视频类型：0-自制，1-转载", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "video_type")
    private Integer videoType;

    /**
     * 转载来源信息（仅当 video_type=1 时有值）
     */
    @ExcelProperty(value = "转载来源信息", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "仅=当,v=ideo_type=1,时=有值")
    private String sourceInfo;

    /**
     * 二创设置：0-否，1-是
     */
    @ExcelProperty(value = "二创设置：0-否，1-是", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "yes_no")
    private Integer isRemix;

    /**
     * 可见范围：0-公开，1-私密，2-仅粉丝可见
     */
    @ExcelProperty(value = "可见范围：0-公开，1-私密，2-仅粉丝可见", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "visibility")
    private Integer visibility;

    /**
     * 声明与权益信息
     */
    @ExcelProperty(value = "声明与权益信息")
    private String copyrightInfo;

    /**
     * 是否关闭弹幕：0-否，1-是
     */
    @ExcelProperty(value = "是否关闭弹幕：0-否，1-是", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "yes_no")
    private Integer disableDanmaku;

    /**
     * 是否关闭评论：0-否，1-是
     */
    @ExcelProperty(value = "是否关闭评论：0-否，1-是", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "yes_no")
    private Integer disableComment;

    /**
     * 是否开启精选评论：0-否，1-是
     */
    @ExcelProperty(value = "是否开启精选评论：0-否，1-是", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "yes_no")
    private Integer enableFeaturedComments;

    /**
     * 视频状态：0-草稿,1-待审核,2-已发布,3-下架
     */
    @ExcelProperty(value = "视频状态：0-草稿,1-待审核,2-已发布,3-下架", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "video_status")
    private Integer videoStatus;

    /**
     * 播放次数
     */
    @ExcelProperty(value = "播放次数")
    private Integer playCount;

    /**
     * 弹幕数量
     */
    @ExcelProperty(value = "弹幕数量")
    private Integer danmakuCount;

    /**
     * 评论数量
     */
    @ExcelProperty(value = "评论数量")
    private Integer commentCount;

    /**
     * 点赞数量
     */
    @ExcelProperty(value = "点赞数量")
    private Integer likeCount;

    /**
     * 投币数量
     */
    @ExcelProperty(value = "投币数量")
    private Integer coinCount;

    /**
     * 收藏数量
     */
    @ExcelProperty(value = "收藏数量")
    private Integer favoriteCount;

    /**
     * 分享次数
     */
    @ExcelProperty(value = "分享次数")
    private Integer shareCount;

    /**
     * 备注
     */
    @ExcelProperty(value = "备注")
    private String remark;

    /**
     * 当前用户的互动行为：点赞 0-否 1-是
     */
    private Integer likeStatus;

    /**
     * 当前用户的互动行为：投币状态 0-未投币 1-投币数量为1  2-投币数量为2，表示无法再次投币
     */
    private Integer coinStatus;

    /**
     * 几天前
     */
    private Integer publishedAgo;
}
